<template>
    <el-button
        v-for="(item, idx) in butList"
        :key="idx"
        :class="item.class"
        :type="item.type"
        :disabled="item.disabled"
        @click="handleButClick(item)"
    >
        {{ item.text }}
    </el-button>
</template>

<script setup name="buttonList">
defineProps({
    butList: {
        type: Array,
        default: () => [
            {
                type: 'default',
                text: '取消',
                isClone: true
            },
            {
                type: 'primary',
                text: '确定'
            }
        ]
    }
})
const emit = defineEmits(['handleButClick'])
const handleButClick = (e) => {
    emit('handleButClick', e)
}
</script>

<style lang="scss" scoped>
.el-button {
  min-width: 88px;
  height: 32px;
}
</style>
